// 全局共享数据示例
import { useState } from 'react';

const useGlobalData = () => {
  const [currentTabs, setCurrentTabs] = useState([
    {
      label: '首页',
      key: '/',
      closable: false,
    },
    {
      label: '登录',
      key: '/login',
    },
  ]);

  const [menus, setMenus] = useState([]);
  const [routes, setRoutes] = useState([]);
  // const currentTabs = useMemo(() => {

  // }, [menus])
  return {
    currentTabs,
    menus,
    setRoutes,
    routes
  };
};

export default useGlobalData;
